@import "./mixins";

.upload-pick {
  input[type=file] {
    display: none;
  }
}

.upload-wrap {
  &.single {
    .upload-pick {
      position: absolute !important;
    }
  }
  .upload-tit {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .upload-body {
    .upload-list {
      margin: 0;
      padding-left: 0;
      list-style: none;
      @include clearfix();
      min-height: 120px;
      position: relative;
      li {
        position: relative;
        float: left;
        width: 120px;
        height: 120px;
        padding: 0;
        @include border-radius(0);
        margin-right: 10px;
        margin-bottom: 10px;
        border: 1px solid $color-border;
        overflow: hidden;
        &.file-item {
          .state {
            margin: 0;
            position: absolute;
            left: 0;
            bottom: 0;
            right: 0;
            text-align: center;
            background: #000000;
            color: #fff;
            font-size: 10px;
            padding: 2px;
          }
          .progress-bar {
            position: absolute;
            left: 0;
            top: 0;
            background: #4CAF50;
            height: 3px;
          }
          .delete {
            position: absolute;
            top: 0;
            right: 0;
            width: 20px;
            height: 20px;
            background: #ff4646;
            text-align: center;
            line-height: 20px;
            color: #fff;
            font-size: 14px;
            z-index: 1;
          }
        }
        &.upload-pick {
          margin-right: 0;
          line-height: 1;
          border: 1px dashed $color-border;
          color: $color-border;
          text-align: center;
          .webuploader-pick {
            width: 100%;
            height: 100%;
          }
          .webuploader-element-invisible {
            position: absolute !important;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1111;
            clip: auto;
            @include opacity(0);
          }
          span {
            padding-top: 35px;
            line-height: 1;
            display: block;
            font-size: 30px;
            i {
              font-size: 25px;
            }
          }
          strong {
            margin-top: 5px;
            display: block;
            font-size: 10px;
            font-weight: normal;
          }
        }
        img {
          vertical-align: top;
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}

//附件上传
.file-upload-wrap {
  .webuploader-pick {
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #20a0ff;
    -webkit-appearance: none;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    margin: 0;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    background-color: #20a0ff;
  }
  .upload-list {
    max-width: 500px;
    margin-top: 30px;
    margin: 0;
    padding-left: 0;
    list-style: none;
    .file-item {
      position: relative;
      overflow: hidden;
      color: #666;
      margin: 10px 0;
      small {
        color: #2196f3;
      }
      &:hover {
        .state {
          display: none;
        }
        .delete {
          display: block;
        }
      }
      .file-title {
        float: left;
        width: 430px;
      }
      .state {
        float: right;
        margin-bottom: 0;
      }
      .progress {
        clear: both;
        margin-top: 10px;
        height: 5px;
      }
      .delete {
        position: absolute;
        right: 0;
        top: 3px;
        width: 15px;
        height: 15px;
        line-height: 15px;
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
        border-radius: 50%;
        text-align: center;
        background-color: #FF5722;
        color: #ffffff;
        display: none;
      }

    }
  }
}

.video-upload-wrap {
  input[type='file'] {
    display: none;
  }
}
.result-text{
  overflow: hidden;
  .result-cancel{
    float: right;
    color: #F15151;
    cursor: pointer;
  }
}

.mobile-upload-wrap {
  &.single {
    .upload-pick {
      position: absolute !important;
    }
  }
  .upload-tit {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .upload-body {
    .upload-list {
      margin: 0;
      padding-left: 0;
      list-style: none;
      @include clearfix();
      min-height: 86px;
      margin-right: -8px;
      li {
        position: relative;
        float: left;
        width: 86px;
        height: 86px;
        padding: 0;
        margin-right: 8px;
        border-radius: 3px;
        //overflow: hidden;
        margin-bottom: 8px;
        &.file-item {
          .state {
            margin: 0;
            position: absolute;
            left: 0;
            bottom: 0;
            right: 0;
            text-align: center;
            background: #000000;
            color: #fff;
            font-size: 10px;
            padding: 2px;
          }
          .progress-bar {
            position: absolute;
            left: 0;
            top: 0;
            background: #4CAF50;
            height: 3px;
          }
          .delete {
            position: absolute;
            top: 0;
            right: 0;
            width: 20px;
            height: 20px;
            background: #000;
            text-align: center;
            line-height: 20px;
            color: #fff;
            font-size: 14px;
            z-index: 1;
            border-radius: 2px;
          }
        }
        &.upload-pick {
          margin-right: 0;
          line-height: 1;
          border: none;
          color: $color-border;
          text-align: center;
          background: #F1F1F1;
          width: 86px;
          height: 86px;
          -webkit-border-radius: 2px;
          -moz-border-radius: 2px;
          border-radius: 2px;

          .webuploader-pick {
            width: 100%;
            height: 100%;
          }
          .webuploader-element-invisible {
            position: absolute !important;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1111;
            clip: auto;
            @include opacity(0);
          }
          span {
            padding-top: 35px;
            line-height: 1;
            display: block;
            font-size: 30px;
            i {
              font-size: 25px;
            }
          }
          strong {
            margin-top: 5px;
            display: block;
            font-size: 10px;
            font-weight: normal;
          }
        }
        img {
          vertical-align: top;
          width: 100%;
          height: 100%;
        }
      }

    }
  }
  .weui-uploader__bd{
    margin-bottom: 0;
  }
}


.mobile-single-upload-wrap {
  &.single {
    .upload-pick {
      position: absolute !important;
    }
  }
  .upload-tit {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .upload-body {
    .upload-list {
      margin: 0;
      padding-left: 0;
      list-style: none;
      @include clearfix();
      min-height: 86px;
      margin-right: -8px;
      li {
        position: relative;
        float: left;
        width: 86px;
        height: 86px;
        padding: 0;
        margin-right: 8px;
        border-radius: 3px;
        //overflow: hidden;
        &.file-item {
          .state {
            margin: 0;
            position: absolute;
            left: 0;
            bottom: 0;
            right: 0;
            text-align: center;
            background: #000000;
            color: #fff;
            font-size: 10px;
            padding: 2px;
          }
          .progress-bar {
            position: absolute;
            left: 0;
            top: 0;
            background: #4CAF50;
            height: 3px;
          }
          .delete {
            position: absolute;
            top: 0;
            right: 0;
            width: 20px;
            height: 20px;
            background: #000;
            text-align: center;
            line-height: 20px;
            color: #fff;
            font-size: 14px;
            z-index: 1;
            border-radius: 2px;
          }
        }
        &.upload-pick {
          margin-right: 0;
          line-height: 1;
          border: none;
          color: $color-border;
          text-align: center;
          background: #F1F1F1;
          width: 86px;
          height: 86px;
          -webkit-border-radius: 2px;
          -moz-border-radius: 2px;
          border-radius: 2px;

          .webuploader-pick {
            width: 100%;
            height: 100%;
          }
          .webuploader-element-invisible {
            position: absolute !important;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1111;
            clip: auto;
            @include opacity(0);
          }
          span {
            padding-top: 35px;
            line-height: 1;
            display: block;
            font-size: 30px;
            i {
              font-size: 25px;
            }
          }
          strong {
            margin-top: 5px;
            display: block;
            font-size: 10px;
            font-weight: normal;
          }
        }
        img {
          vertical-align: top;
          width: 100%;
          height: 100%;
        }
      }
      li:nth-child(2){
        opacity: 0;
      }

    }
  }
  .weui-uploader__bd{
    margin-bottom: 0;
  }
}

.mobile-upload-file {
  &.single {
    .upload-pick {
      position: absolute !important;
    }
  }
  .upload-tit {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .upload-body {
    .upload-list {
      margin: 0;
      padding-left: 0;
      list-style: none;
      @include clearfix();
      min-height: 68px;
      margin-right: -8px;
      .upload-pick{
        margin-right: 0;
        line-height: 1;
        border: none;
        color: $color-border;
        text-align: center;
        background: #F1F1F1;
        width: 86px;
        height: 86px;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
        border-radius: 2px;
      }
      li {
        position: relative;
        float: left;
        width: 86px;
        height: 86px;
        padding: 0;
        margin-right: 8px;
        border-radius: 3px;
        // border: none!important;
        border: 1px solid #eaeaea;
        overflow: hidden;
        margin-bottom: 8px;

        .webuploader-pick {
          width: 100%;
          height: 100%;
        }

        &.file-item {
          .state {
            margin: 0;
            position: absolute;
            left: 0;
            bottom: 0;
            right: 0;
            text-align: center;
            background: #000000;
            color: #fff;
            font-size: 10px;
            padding: 2px;
          }
          .progress-bar {
            position: absolute;
            left: 0;
            top: 0;
            background: #4CAF50;
            height: 3px;
          }
          .delete {
            position: absolute;
            top: 0;
            right: 0;
            width: 20px;
            height: 20px;
            background: #ff4646;
            text-align: center;
            line-height: 20px;
            color: #fff;
            font-size: 14px;
            z-index: 1;
          }
        }

        img {
          vertical-align: top;
          width: 100%;
          height: 100%;
        }
      }


    }
  }
}

// 头像上传
.avatar-upload{
  .file-item{
    border: 0;
  }
  .progress-bar{
    display: none;
  }
}
